#include "common.h"

vector<int> twoSum(vector<int>& price, int target)
{
	int right = price.size() - 1;
	int left = 0;
	while (left < right)
	{
		if (price[left] + price[right] == target)
			return { price[left], price[right] };
		else if (price[left] + price[right] < target)
			left++;
		else
			right--;
	}
	return { 0, 0 };
}